/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.mine.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
import java.util.List;
import com.google.common.collect.Lists;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.supcan.annotation.treelist.cols.SupCol;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

/**
 * 煤井和巷道一对多Entity
 * @author 保存成功
 * @version 2018-10-29
 */
public class Mine extends DataEntity<Mine> {
	
	private static final long serialVersionUID = 1L;
	private String minename;		// 煤井名
	private Double longitude;		// 经度
	private Double latitude;		// 纬度
	private Double depth;		// 深度
	private Double diameter;		// 直径
	private List<Roadway> roadwayList = Lists.newArrayList();		// 子表列表
	
	public Mine() {
		super();
	}

	public Mine(String id){
		super(id);
	}

	@SupCol(isUnique="true", isHide="true")
	@ExcelField(title="ID", type=1, align=2, sort=1)
	public String getId() {
		return id;
	}
	@Length(min=1, max=255, message="矿井名长度必须介于 1 和 255 之间")
	@ExcelField(title="矿井名称", align=2, sort=5)
	public String getMinename() {
		return minename;
	}

	public void setMinename(String minename) {
		this.minename = minename;
	}
	
	@NotNull(message="经度不能为空")
	@ExcelField(title="经度", align=2, sort=10)
	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}
	
	@NotNull(message="纬度不能为空")
	@ExcelField(title="纬度", align=2, sort=15)
	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}
	
	@NotNull(message="深度不能为空")
	@ExcelField(title="深度", align=2, sort=20)
	public Double getDepth() {
		return depth;
	}

	public void setDepth(Double depth) {
		this.depth = depth;
	}
	
	@NotNull(message="直径不能为空")
	@ExcelField(title="直径", align=2, sort=25)
	public Double getDiameter() {
		return diameter;
	}

	public void setDiameter(Double diameter) {
		this.diameter = diameter;
	}
	
	public List<Roadway> getRoadwayList() {
		return roadwayList;
	}

	public void setRoadwayList(List<Roadway> roadwayList) {
		this.roadwayList = roadwayList;
	}
}